import logging
from controllers import query
import webapp2

app = webapp2.WSGIApplication([
    ('/display/', query.DisplayAnswer),
    ('/query/', query.QueryForm),
    ('/retrieve/', query.Retriever),
], debug=True)


# Extra Handler like 404 500 etc
def handle_404(request, response, exception):
    logging.exception(exception)
    response.write('Oops! This is a 404')
    response.set_status(404)

app.error_handlers[404] = handle_404
